#ifndef _GXHT_
#define _GXHT_
#include "iot_i2c.h"
#include "iot_i2c_ex.h"
#include "stdint.h"
#include "iot_gpio.h"
#include "iot_gpio_ex.h"
#include "ohos_init.h"
#include "cmsis_os2.h"
#include <unistd.h>
#include <stdio.h>
#include <string.h>


#define Deviece_Address 0x44 

#define IIC_id 0
#define I2C_BAUDRATE 400000
#define GPIO_SCL    9
#define GPIO_SDA    10

typedef struct GXHT30_INFO
{
    float tempreture;
    float humidity;
}_GXHT30_Info;

extern struct GXHT30_INFO GXHT30_Info;

int GXHT_IIC_INIT();

void GXHT_Read_Data();

void GXHT_Task();

void GXHT_Entry(void);

int GXHT_INIT();

float GXHT3xCalcTemperatureC(uint16_t u16sT);

float GXHT3xCalcRH(uint16_t u16sRH);

uint8_t GXHT3xCheckCrc(uint8_t data[], uint8_t nbrOfBytes, uint8_t checksum);

#endif